package com.knowvoyage.knowvoyageserver.pojo.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.Data;
import java.time.LocalDateTime;

@Schema(description = "对话实体类")
@Data
public class Dialog {
    private Long dialogId;

    @NotNull(message = "用户ID不能为空")
    @Positive(message = "用户ID必须为正数")
    private Long userId;

    @NotBlank(message = "会话名称不能为空")
    @Size(min = 1, max = 100, message = "会话名称长度必须在1-100个字符之间")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5a-zA-Z0-9_\\-\\s]+$",
            message = "会话名称只能包含中文、字母、数字、下划线、短横线和空格")
    private String name = "新会话";

    private LocalDateTime createTime;
}
